package ${package}.${bottomName}.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.xiangxiang.commonbase.entity.PageBase;
import javax.validation.constraints.*;
import lombok.*;
<#if hasDate?? && hasDate>
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
</#if>
<#if hasInstant?? && hasInstant>
import java.time.Instant;
</#if>
<#if hasBigDecimal?? && hasBigDecimal>
import java.math.BigDecimal;
</#if>

/**
* ${comments}
*
* @author ${author}
* @date ${datetime}
* 邮箱=-> ${email}
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "${comments}查询参数")
public class ${className}QueryReq extends PageBase{

<#if columns?? &&columns?size gt 0>
	<#list columns as column>
	/**
	* ${column.comments}
	*/
		<#if column.nullAble?? &&column.nullAble=='true'&& column.columnName?? && pk.columnName?? && column.columnName != pk.columnName>
	@NotBlank(message="${column.comments}不能为空")
		</#if>
		<#if column.nullAble?? && column.nullAble=='true'>
	@ApiModelProperty(value = "${column.comments}",required = true)
		<#else>
	@ApiModelProperty(value = "${column.comments}")
		</#if>
		<#if column.attrType?? && column.attrType=='Date'>
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
		</#if>
	<#if column.defaultValue?? && column.defaultValue!=null >
	<#if column.attrType?? && column.attrType=='String'>
	private ${column.attrType} ${column.attrname} ="${column.defaultValue}";
	<#elseif column.attrType?? && column.attrType=='Date' && column.defaultValue=='CURRENT_TIMESTAMP'>
	private ${column.attrType} ${column.attrname} =new Date();
	<#elseif column.attrType?? && column.attrType=='Instant' && column.defaultValue=='CURRENT_TIMESTAMP'>
	private ${column.attrType} ${column.attrname} =Instant.now();
	<#elseif column.attrType?? && column.attrType=='BigDecimal' && column.defaultValue!=null>
	private ${column.attrType} ${column.attrname} =new BigDecimal(${column.defaultValue});
	<#else>
	private ${column.attrType} ${column.attrname} =${column.defaultValue};
	</#if>
	<#else>
	private ${column.attrType} ${column.attrname};
	</#if>
	</#list>
</#if>
	/**
	* 选择时区
	*/
	@ApiModelProperty(value = "时区", example = "UTC+9")
	private String timezone;
}
